<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>nmrglue.process.proc_lp.lp2d &mdash; nmrglue v0.1 documentation</title>
    <link rel="stylesheet" href="../../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '0.1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="nmrglue v0.1 documentation" href="../../index.html" />
    <link rel="up" title="nmrglue.proc_lp" href="../proc_lp.html" />
    <link rel="next" title="nmrglue.process.proc_lp.cadzow" href="nmrglue.process.proc_lp.cadzow.html" />
    <link rel="prev" title="nmrglue.process.proc_lp.lp_tls" href="nmrglue.process.proc_lp.lp_tls.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="nmrglue.process.proc_lp.cadzow.html" title="nmrglue.process.proc_lp.cadzow"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="nmrglue.process.proc_lp.lp_tls.html" title="nmrglue.process.proc_lp.lp_tls"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">nmrglue v0.1 documentation</a> &raquo;</li>
          <li><a href="../index.html" >Reference Guide</a> &raquo;</li>
          <li><a href="../proc_lp.html" accesskey="U">nmrglue.proc_lp</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="nmrglue.process.proc_lp.lp_tls.html"
                                  title="previous chapter">nmrglue.process.proc_lp.lp_tls</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="nmrglue.process.proc_lp.cadzow.html"
                                  title="next chapter">nmrglue.process.proc_lp.cadzow</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/reference/generated/nmrglue.process.proc_lp.lp2d.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="nmrglue-process-proc-lp-lp2d">
<h1>nmrglue.process.proc_lp.lp2d<a class="headerlink" href="#nmrglue-process-proc-lp-lp2d" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="nmrglue.process.proc_lp.lp2d">
<tt class="descclassname">nmrglue.process.proc_lp.</tt><tt class="descname">lp2d</tt><big>(</big><em>data</em>, <em>pred</em>, <em>P</em>, <em>M</em>, <em>mirror='0'</em>, <em>fix_points=True</em>, <em>method='svd'</em><big>)</big><a class="headerlink" href="#nmrglue.process.proc_lp.lp2d" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform a forward 2D linear prediction extrapolation on data.</p>
<p>Use the 2D linear prediction algorithm presented in:
G. Zhu and A. Bax, Journal of Magnetic Resonance, 1992, 98, 192-199.
to extend the last (1) axis by pred points. A PxM prediction matrix, C,
is formed by solving the modified linear prediction equation given by:</p>
<p>data[n,m] = /sigma_{l=0}^{P-1} /sigma_{k=1}^M C_{l,k}*data[n-l,m-k]</p>
<p>For all valid points in data.  This prediction matrix together with the 
data matrix with a mirror image appended is used to extend the last (1) 
axis by pred points resulting in a new array of size [N_0,N_1+pred] where
N_0 and N_1 are the sizes of the original data.  To linear predict 
both dimensions this function should be called twice with a transpose
between the calls.</p>
<p>Backward linear prediction using this method is not possible as the 
method depends on being able to mirror the data before the first collected
point.  In backward mode this would correspond to being able to correctly
determind points after the last point which cannot be determinded using the
mirror method.  A backward prediction matrix can be calculated but would
not prove useful.</p>
<p>The forward-backward averaging of the linear prediction coefficients is
not possible as there is no characteristic polynomial to root and reflect.
Therefore the backward prediction matrix cannot be reversed.</p>
<p>Note that the axes in this function are reversed as compared to the 
JMR paper.</p>
<p>Parameters:</p>
<ul>
<li><p class="first">data       2D data (time domain for both axes).</p>
</li>
<li><p class="first">pred       Number of points to predict along the last axis.</p>
</li>
<li><p class="first">P          Prediction matrix length along the non-predicted (0) axis.</p>
</li>
<li><p class="first">M          Prediction matrix length along the predicted (1) axis.</p>
</li>
<li><dl class="first docutils">
<dt>mirror     &#8216;0&#8217; or &#8216;180&#8217; indicating how the mirror image of the </dt>
<dd><p class="first last">non-predicted axis should be formed. &#8216;0&#8217; indicated no delay, 
&#8216;180&#8217; for a half-point delay&#8217;</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>fix_points Set to True to reduce predicted points with magnitude larger</dt>
<dd><p class="first last">than the largest data point. False leaved predicted points 
unaltered.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>method     Method used to calculate the LP prediction matrix, choose from</dt>
<dd><p class="first last">&#8216;svd&#8217;,&#8217;qr&#8217;,&#8217;cholesky&#8217;, or &#8216;tls&#8217;</p>
</dd>
</dl>
</li>
</ul>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="nmrglue.process.proc_lp.cadzow.html" title="nmrglue.process.proc_lp.cadzow"
             >next</a> |</li>
        <li class="right" >
          <a href="nmrglue.process.proc_lp.lp_tls.html" title="nmrglue.process.proc_lp.lp_tls"
             >previous</a> |</li>
        <li><a href="../../index.html">nmrglue v0.1 documentation</a> &raquo;</li>
          <li><a href="../index.html" >Reference Guide</a> &raquo;</li>
          <li><a href="../proc_lp.html" >nmrglue.proc_lp</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2010, Jonathan J. Helmus.
      Last updated on Apr 04, 2011.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
    </div>
  </body>
</html>